package spring.chatroom.java_chatroom.pojo;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.socket.WebSocketSession;

import java.net.http.WebSocket;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class WebSocketAndTime implements Comparable<Long>{
    WebSocketSession webSocket;
    //毫秒
    Long time;

    @Override
    public int compareTo(@NotNull Long o) {
        return (int)(this.time - o);
    }
}
